package com.company.model;

/**
 * 评论类型
 * Created by tu on 2017/7/14.
 */
public enum CommentType {
  /**
   * 好评
   */
  DIGG(1),
  /**
   * 无用
   */
  BURY(0);
  public final int type;

  CommentType(int type) {
    this.type = type;
  }

  public static CommentType fromType(int type) {
    for (CommentType state : values()) {
      if (state.type == type) {
        return state;
      }
    }
    return BURY;
  }
}
